import { SearchRenderScope } from "@/components/ProTable/interface";

// export const TxsSearchRangeInput = (params: SearchRenderScope) => {
//   return customTxsSearchRangeInput(params, "text");
// };
export const KeyInputBetweenMin = "input_between_min_";
export const KeyInputBetweenMax = "input_between_max_";
// export const KeyDateBetweenMax = "date_between_min_";
// export const KeyDateBetweenMax = "date_input_between_max_";

export const TxsSearchBetweenInput = (
  params: SearchRenderScope,
  fieldName: string,
  placeholderMin = "输入最小值",
  placeholderMax = "输入最大值"
) => {
  if (!params.searchParam[fieldName]) {
    params.searchParam[fieldName] = [];
  }

  return (
    <div className="flx-center">
      <el-input vModel_trim={params.searchParam[fieldName][0]} placeholder={placeholderMin} />
      <span className="mr10 ml10">-</span>
      <el-input vModel_trim={params.searchParam[fieldName][1]} placeholder={placeholderMax} />
    </div>
  );
};


